package oop.book;

public class BookTest {
    public static void main(String[] args) {
       //使用空构造方法，需要手动传参
        Book book=new Book();
        book.id=1;
        book.name="水浒传";
        book.price=1000;
        //使用带参构造方法
        Book book1=new Book(2,"水浒传",1000);

        book.show();
        book1.show();
    }
}
